package com.zghhost.codedemo.lambdaexpression;

/**
 * @author guohua.zhang@zhaopin.com.cn
 * @Date 2019/3/29 17:43
 */
public class MyFIWrapper {
    public static int i = 0;

    public static MyFunctionInterface getmfi(int x){
        return () -> {
            i += x;
        };
    }

    public static void main(String[] args){
        System.out.println(MyFIWrapper.i);
        MyFunctionInterface mfi = MyFIWrapper.getmfi(2);
        System.out.println(MyFIWrapper.i);
        mfi.action();
        System.out.println(MyFIWrapper.i);
    }
}
